﻿using Mate.Db.Model.Merchant;
using Mate.Db.SqlSugar;
using Mate.Dto.Merchant;
using System;
using System.Collections.Generic;
using System.Text;

namespace Mate.Merchant.Service
{
    public interface IMerchantCategoryService : IDataService<mp_merchant_category>
    {
        /// <summary>
        /// 获取商户类型Tree列表
        /// </summary>
        /// <param name="is_valid">1启用，2禁用</param>
        /// <param name="id">商户分类id，如果有值查询当前分类及子分类</param>
        /// <returns></returns>
        IList<MerchantCategoryTreeModel> GetMerchantCategoryTree(int? is_valid = null, int id = 0);

        /// <summary>
        /// 根据id获取当前分类及其子分类
        /// </summary>
        /// <param name="id">分类id</param>
        /// <returns></returns>
        IList<mp_merchant_category> GetCurrentMerchantCategoryAndChildren(int id);

        /// <summary>
        /// 查询热门商户类型
        /// </summary>
        /// <param name="merchantcategoryparentid">上级id(0查询一级分类)</param>
        /// <param name="top">返回几条数据</param>
        /// <returns></returns>
        IList<HotMerchantCategoryDto> GetHotMerchantCategoryList(int merchantcategoryparentid,int top=5);
    }
}
